<template>

     <el-row >
      <el-col :span="6">
        <el-input placeholder="请输入项目根路径" v-model="projectPath" clearable @input='saveProjectPath'/>
      </el-col>
    </el-row>

</template>

<script>
export default {
  data(){
      return {
          projectPath : ''
      }
  },
  created() {
      //取出项目的根路径
      var storage = window.sessionStorage
      var projectPath = storage.getItem("projectPath"); 
      if(projectPath){
        this.projectPath = projectPath
      }
      console.log(projectPath)
  },
  methods: {
        saveProjectPath(val) {
            var storage = window.sessionStorage
            storage.setItem("projectPath",val)
            console.log(val)
        }
    }
}

</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="less" scoped>


</style>
